Video decoders include a function commonly referred to as “motion compensation.” This function is necessary to allow the decoder to process numerous different video compression standards, including but not necessarily limited to: MPEG-1, MPEG-2, MPEG-4, H.263, H.264, and H.261. More specifically, motion compensation includes a process of copying a two-dimensional block of image data from a previously decoded reference frame to the frame currently being decoded. The location of the reference block relative to the current position in the current frame is specified by “motion vectors” included within the input code stream. Motion compensation allows for a compact specification of the data whenever the video stream is well modeled by translational motion.
Typically, reference frames that are used for motion compensation are stored in a relatively large memory (typically DRAM). To improve general performance, DRAMs are generally accessed in bursts of data (usually 2, 4, 8, or 16 data words in a burst). Accesses within a single burst are highly efficient (1 word per clock cycle with single data rate (SDR) DRAM, 2 words per clock cycle with double data rate (DDR) DRAM).
In cases where the memory data interface is 32 bits wide (word size of 4 bytes) and the burst size is 2 words, then each burst accesses 8 bytes (2 words×4 bytes per word). However, bursts can only access data aligned to burst boundaries, and therefore a burst of N words must be aligned to an address integrally divisible by N.
Furthermore, additional memory read inefficiencies are introduced when each pixel contains multiple components of an image and, as in motion compensation, it is necessary to retrieve the data for all of the image components to use the data. This further increases the number of bursts necessary to read a particular set of data.